package book.nettyinaction.ch07;

import io.netty.channel.Channel;
import io.netty.util.concurrent.ScheduledFuture;

import java.util.concurrent.TimeUnit;

/**
 * 代码清单 7-3 使用 EventLoop 调度任务
 */
public class Demo03EventLoop {
    public static void main(String[] args) {
        Channel ch = null;

        ScheduledFuture<?> future = ch.eventLoop().schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("60 seconds later");
            }
        }, 60, TimeUnit.SECONDS);
    }
}
